package dao

import (
	"video-comments/global"
)

func AddFile[T any](data *T) error {
	return global.DB.Create(&data).Error
}

func GetOneByFile[T any](where *T, data *T) error {
	return global.DB.Where(where).Limit(1).Find(&data).Error
}
